package com.example.demo.controller;

import com.example.demo.service.impl.RoomServiceImple;
import com.example.demo.vo.InsertActivityVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/room")
public class RoomController {
    @Resource
    private RoomServiceImple roomServiceImple;

    @GetMapping("/selectActAll")
    public Map<String, Object> selectActAll() {
        return roomServiceImple.selectActAll();
    }
    @PostMapping("/deleteById")
    public Map<String, Object> deleteById(@RequestParam int id) {
        return roomServiceImple.deleteById(id);
    }
    @PostMapping("/insertActivity")
    public Map<String, Object> insertActivity(@RequestBody InsertActivityVo insertActivityVo) {
        return roomServiceImple.insertActivity(insertActivityVo);
    }

}
